package com.zx.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.controller.client.LogClient;
import com.zx.cloud.domain.Log;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

import io.swagger.annotations.ApiOperation;

/**
 * @author Alex
 */
@RestController
@RequestMapping(value = ApiVersion.MANAGER_V1_PREFIX + "/log", produces = { MediaType.APPLICATION_JSON_UTF8_VALUE }, consumes = { MediaType.APPLICATION_JSON_UTF8_VALUE })
public class LogController {

	@Autowired
	private LogClient logClient;

	@ApiOperation(value = "查询日志" , notes="查询日志")
	@RequestMapping(value = "queryLog", method = RequestMethod.POST)
	@ResponseBody
	public ObjectDataResponse<Page<Log>> queryLog(@RequestBody Log log){
		ObjectDataResponse<Page<Log>> datas=logClient.queryLog(log);
		return datas;
	}
}
